package com.firewolf.entities;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *  持久化类
 * @author liuxing
 *
 */
@Entity//将类标注出持久化类
@Table(name="t_customer")//指定表名
public class Customer {
	@Id//标注ID字段
	@GeneratedValue(strategy=GenerationType.AUTO)//指定主键生成策略
	private Integer id;
	@Basic//默认标注
	private String name;
	//指定时间格式为：年月日
	@Temporal(TemporalType.DATE)
	private Date birthday;
	//指定时间格式为：年月日时分秒
	@Temporal(TemporalType.TIMESTAMP)
	private Date orderTime;
	@Transient//这个注解用于不在数据库生成字段
	private String birthdayStr;
	@Column(name="descri",length=100,nullable=true)
	private String content;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	public Date getOrderTime() {
		return orderTime;
	}
	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}
	public String getBirthdayStr() {
		return birthdayStr;
	}
	public void setBirthdayStr(String birthdayStr) {
		this.birthdayStr = birthdayStr;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
}
